﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;

namespace NoteHelper.IBusiness
{
    public interface IServiceBase<T> where T : class
    {
        int GetCount();

        T Get(object id);

        object Add(T entity);

        int Update(T entity);

        int Delete(object id);

        IList<T> GetAll();

        /// <summary>
        /// 用于输出MyBatis执行的SQL语句
        /// </summary>
        /// <param name="statementName">对应XML中的配置名</param>
        /// <param name="paramObject">实际参数</param>
        void LogRuntimeSql(string statementName, object paramObject);
        DataTable QueryForDataTable(string statementName, object parameterObject);
    }
}
